<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高,选中几率越大 -->
		<style>
			*{
				/*权值 0 很容易被覆盖*/
				color: #ffbdfc;
				background: #ffd0de;
			}
			div{/*权值 1*/
				color: #fff457;
				background: #d2fff8;
			}
			.di{/*权值10*/
				color: #d3ffd3;
				background: #f9ffe2;
			}
			div.di{/*选择器权值之和  权值1+10 11*/
				color: #dcffef;
				background: #ffdcd5;
			}
			body div.d1{/*权值12*/
			font-size: 25px;
			color: #c5ffdb;
			background: #ffff7f;
				
			}
			#d1{/*权值100*/
				font-size: 15px;
				color: #55ffff;
				background: #3cff07;
			}
			div#d1{/*权值101*/
				font-size: 15px;
				color: #55ffff;
				background: #3cff07;
			}
			div#d1:hover{/*权值111*/
				font-size: 15px;
				color: #55ffff;
				background: #3cff07;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Id impedit amet autem quasi blanditiis nulla nostrum fugit enim harum? Molestias qui vero fugit commodi sed magni vel eum animi neque?</div>
	</body>
</html>